<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
  <database name="default" defaultIdMethod="none">
    <table name="I_BANKSTATEMENT">
      <column name="I_BANKSTATEMENT_ID" primaryKey="true" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_CLIENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_ORG_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ISACTIVE" primaryKey="false" required="false" type="CHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="CREATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="CREATEDBY" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="UPDATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="UPDATEDBY" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="I_ISIMPORTED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="I_ERRORMSG" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false"/>
      <column name="PROCESSED" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="C_BANKSTATEMENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="STATEMENTDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="C_BANKACCOUNT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ROUTINGNO" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
      <column name="BANKACCOUNTNO" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
      <column name="C_PAYMENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="PAYMENTDOCUMENTNO" primaryKey="false" required="false" type="VARCHAR" size="30" autoIncrement="false"/>
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ISO_CODE" primaryKey="false" required="false" type="CHAR" size="3" autoIncrement="false"/>
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="NAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="BPARTNERVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="C_INVOICE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="INVOICEDOCUMENTNO" primaryKey="false" required="false" type="VARCHAR" size="30" autoIncrement="false"/>
      <column name="C_CHARGE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="CHARGENAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="CHARGEAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_BANKSTATEMENTLINE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="LINE" primaryKey="false" required="false" type="DECIMAL" size="10" autoIncrement="false"/>
      <column name="DATEACCT" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="VALUTADATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="STATEMENTLINEDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="TRXTYPE" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
      <column name="REFERENCENO" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="MEMO" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="ISREVERSAL" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="INTERESTAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="TRXAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="LINEDESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="STMTAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="EFTSTATEMENTDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="EFTSTATEMENTREFERENCE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="EFTSTATEMENTLINEDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="EFTVALUTADATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="EFTREFERENCE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="EFTCHECKNO" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
      <column name="EFTTRXID" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="EFTTRXTYPE" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
      <column name="EFTMEMO" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false"/>
      <column name="EFTPAYEE" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="EFTPAYEEACCOUNT" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="EFTAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="EFTCURRENCY" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
      <column name="CREATEPAYMENT" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="MATCHSTATEMENT" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <foreign-key foreignTable="C_BANKACCOUNT" name="CBANKACCOUNT_IBANKSTATEMENT" onDelete="setnull">
        <reference local="C_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BANKSTATEMENT" name="CBANKSTATEMENT_IBANKSTATEMENT" onDelete="setnull">
        <reference local="C_BANKSTATEMENT_ID" foreign="C_BANKSTATEMENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BANKSTATEMENTLINE" name="CBANKSTMTLINE_IBANKSTMT" onDelete="setnull">
        <reference local="C_BANKSTATEMENTLINE_ID" foreign="C_BANKSTATEMENTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_IBANKSTATEMENT" onDelete="setnull">
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_IBANKSTMT" onDelete="setnull">
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_IBANKSTATEMENT" onDelete="setnull">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICE" name="CINVOICE_IBANKSTATEMENT" onDelete="setnull">
        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PAYMENT" name="CPAYMENT_IBANKSTATEMENT" onDelete="setnull">
        <reference local="C_PAYMENT_ID" foreign="C_PAYMENT_ID"/>
      </foreign-key>
      <check>
        <rule><![CDATA[IsActive in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[Processed in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[IsReversal in ('Y','N')]]></rule>
      </check>
    </table>
  </database>
